8379694: [lworld] Add value class test coverage to java.util.Arrays#2314
8379694: [lworld] Add value class test coverage to java.util.Arrays#2314bwhuang-us wants to merge 3 commits intoopenjdk:lworldfrom
Conversation
|
👋 Welcome back bhuang! A progress list of the required criteria for merging this PR into |
|
@bwhuang-us This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 19 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@liach, @lmesnik) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
liach
left a comment
There was a problem hiding this comment.
Lgtm, the error message beautification is trivial.
…ata for clearer JUnit output
Tests Updated
TEST.groups
Add java/util/Arrays to valhalla_adopted, bringing the Arrays test directory into the Valhalla-adopted test group.
AsList.java
Add value-oriented object-array datasets: an @AsValueClass record, boxed Integer, LocalDate, and Optional. This extends the existing iterator contract test to ensure Arrays.asList() behaves the same for value-capable elements, including assertSame on iteration.
ArrayObjectMethods.java
Add an @AsValueClass record and extend the random object/nested-object generators so value objects and value-object arrays participate in the existing toString, deepToString, hashCode, deepHashCode, and deepEquals coverage. This broadens mixed-content object-array coverage rather than adding a separate value-only test path.
ArraysEqCmpTest.java
Add an @AsValueClass Point type and a corresponding ArrayType so the existing Arrays.equals, Arrays.compare, and Arrays.mismatch matrix now runs on value-object arrays too. The object-array same-element tests were also generalized to use the ArrayType abstraction instead of assuming Integer[].
Big.java
Add a large-array Point[] path using an @AsValueClass record. This extends the existing huge-array binarySearch and range-sort coverage to value-object arrays.
CopyMethods.java
Add Point, LocalDate, and Optional to the reflective copy/copyOfRange test matrix, plus the coercion and cloner wiring needed for those types. This extends the existing generic copy-method framework to value-capable reference types.
Correct.java
Add an @AsValueClass Point type plus default-sort and comparator-sort subrange tests for Point[], using the existing “compare against reference sort” approach.
Fill.java
Add an @AsValueClass array target and verify existing exception behavior when filling it with the wrong type or with an out-of-bounds range.
HashCode.java
Add an @AsValueClass Point test that checks Arrays.hashCode(Point[]) is equal for equal value-object arrays and stable across repeated calls.
SetAllTest.java
Add Point[] coverage for Arrays.setAll and Arrays.parallelSetAll, including normal generation cases and the existing null-argument exception checks.
Sorting.java
Add an @AsValueClass Point sort path to the main sorting test suite. This extends the existing object-sort coverage to value objects for both natural ordering and comparator ordering.
StreamAndSpliterator.java
Extend the existing null-array and bad-range exception tests to additional reference-array types: Integer[], Long[], Optional[], and LocalDate[]. This broadens object-array coverage for Arrays.stream, Arrays.spliterator, and Spliterators.spliterator.
largeMemory/ParallelPrefix.java
Add an @AsValueClass VInt type and extend the existing parallelPrefix framework to cover value-object arrays, including normal prefix computation plus NPE/IAE/AIOOBE checks.
Tests With No Change
FloatDoubleOrder.java
No change -- primitive-only float/double ordering test.
SortingIntBenchmarkTestJMH.java, SortingLongBenchmarkTestJMH.java
No change -- primitive-array JMH benchmarks.
SortingNearlySortedPrimitive.java
No change -- primitive-only nearly-sorted coverage.
TimSortStackSize.java, TimSortStackSize2.java
No change -- TimSort stack-shape regression tests over existing Integer[] inputs.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2314/head:pull/2314$ git checkout pull/2314Update a local copy of the PR:
$ git checkout pull/2314$ git pull https://git.openjdk.org/valhalla.git pull/2314/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2314View PR using the GUI difftool:
$ git pr show -t 2314Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2314.diff
Using Webrev
Link to Webrev Comment